package com.zx.service.impl;

import com.zx.DAO.AchievementDao;
import com.zx.entity.Achievements;
import com.zx.service.AchievementInte;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 程仟磊
 * @date 2021/7/27
 */
@Service
public class AchievementImpl implements AchievementInte {
    @Resource
    private AchievementDao achievementDao;
    @Override
    public List findProjectByName(String user) {
        return achievementDao.findProjectByName(user);
    }

    @Override
    public int addAchievement(Achievements achievements) {
        return achievementDao.addAchievement(achievements);
    }

    @Override
    public void updateAchievement(String aid, String astate) {
        achievementDao.updateAchievement(Integer.parseInt(aid),astate);
    }

    @Override
    public Object findAchieventById(String pid) {
        return achievementDao.findAchieventById(Integer.parseInt(pid));
    }

    @Override
    public List findProjectBystate(String user,String astate) {
        return achievementDao.findProjectBystate(user,astate);
    }

    @Override
    public List findAllAchievement() {
        return achievementDao.findAllAchievement();
    }

    @Override
    public List findMyAchievement(String uname) {
        return achievementDao.findMyAchievement(uname);
    }

    @Override
    public void changeAchievement(Achievements achievements) {
        achievementDao.changeAchievement(achievements);
    }
}
